﻿@using OF.Component.Model
@using OF.Utility
@model  List<MessageInfo>

<div class="box-body table-responsive no-padding">
    <table class="table table-hover body-table-head">
        <thead>
            <tr>
                <th width="8%">
                    消息标题
                </th>
                <th width="15%">
                    消息简介
                </th>
                <th width="8%">
                    消息类型
                </th>
                <th width="8%">
                    消息来源
                </th>
                <th width="20%">
                    消息明细
                </th>
                <th width="8%">
                    操作人ID
                </th>
                <th width="8%">
                    是否发送
                </th>
                <th width="8%">
                    发送时间
                </th>
                <th width="8%">
                    创建日期
                </th>
            </tr>
        </thead>
        <tbody id="dataView" data-count="@ViewBag.OutCount">
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.MessageTitle</td>
                    <td> <p style="width:120px" class="ellipsis"  title="@item.MessageDesc">@item.MessageDesc</p></td>
                    <td>
                        @if (item.MessageType == 1)
                        {
                            <p>预约</p>
                        }
                        else if (item.MessageType == 2)
                        {
                            <p>通知消息</p>
                        }
                        else
                        {
                            <p>其他</p>
                        }
                    </td>
                    <td>
                        @if (item.MessageSource == 1)
                        {
                            <p>系统自动</p>
                        }
                        else
                        {
                            <p>OP</p>
                        }
                    </td>
                    <td> <p style="width:180px" class="ellipsis" title="@item.MessageBody">@item.MessageBody</p></td>
                    <td>@item.OperationID</td>
                    <td>
                        @if (item.IsSend == 0)
                        {
                            <p>未发送</p>
                        }
                        else
                        {
                            <p>已发送</p>
                        }
                    </td>
                    <td>
                        @if (!DateTimeHelper.IsNullDateTime(@item.SendDate))
                        {
                            <p style="width:80px" class="ellipsis" title="@item.SendDate.ToString("yyyy/MM/dd hh:mm:ss")">@item.SendDate.ToString("yyyy/MM/dd hh:mm:ss")</p>
                        }
                        else
                        {
                            <p>暂无</p>
                        }
                    </td>
                    <td><p style="width:80px" class="ellipsis" title="@item.CreatedDate.ToString("yyyy/MM/dd hh:mm:ss")"> @item.CreatedDate.ToString("yyyy/MM/dd hh:mm:ss")</p></td>
                </tr>
            }
        </tbody>
    </table>
</div>
@if (Model.Count <= 0)
{
    <div class="no-data" id="nodata">
        <div class="img-box"></div>
        <div class="text">暂无数据</div>
    </div>
}
<div class="box-footer clearfix ">
    <ul id="pagination" class="pagination pagination-sm no-margin pull-right"></ul>
</div>




